package xj.graph2d.graph;

public interface GraphComponent {

  public int getType();

  public String getId();

  public void setId(String id);

  public boolean isNode();

  public boolean isEdge();

  public boolean isSubgraph();

  public Graph getGraph();

  public Subgraph getSubgraph();

  // tho owner/parent node/subgraph
  public void setGraph(Graph graph);

  public void setSubgraph(Subgraph subgraph);

  public void setAttribute(String name, Object value);

  public Object getAttribute(String key);

  public void removeAttribute(String key);

  public boolean hasAttribute(String key);

  public String getName(); // name is unique

  public void setName(String name);

  public String getLabel();

  public void setLabel(String label);

  public double getWeight();

  public void setWeight(double weight);

  public void setMark(int mark, boolean flag);

  public boolean getMark(int mark);

  public void setAux(Object aux);

  public Object getAux();

}
